//
//  SubTable.m
//  List
//
//  Created by cocoazxj@163.com on 15/3/23.
//  Copyright (c) 2015年 handcool. All rights reserved.
//

#import "SubTable.h"
#import "TableModel.h"

@interface SubTable ()
@property (nonatomic, strong) TableModel * tableModel;
@end

@implementation SubTable
+ (instancetype)subTable
{
    NSArray *array = [[NSBundle mainBundle] loadNibNamed:@"SubTable" owner:nil options:nil];
    return [array firstObject];
}

+ (instancetype)subTable:(TableModel *)tableModel
{
    SubTable *view = [SubTable subTable];
    view.tableModel = tableModel;
    return view;
}

- (void)setTableModel:(TableModel *)tableModel
{
    _tableModel = tableModel;
    self.lb_tip.text = tableModel.tip;
    self.iv_image.image = tableModel.image;
}

- (IBAction)downButtonClicked:(id)sender
{
    NSLog(@"down----%@",self.tableModel.tip);
}
@end
